package com.aorise.utils.push;

import java.util.List;

/**
 * @Auther: zhouhao
 * @Date: 2019/6/18
 * @Description: 消息推送实体类
 */
public class PushMessage {

    /**
     * 推送客户端id
     */
    private String cid;


    /**
     * 推送别名
     */
    private String alias;

    /**
     * 推送用户的类型Ios还是Android
     */
    private String type;

    /**
     * 推送标题
     */
    private String title;

    /**
     * 推送内容
     */
    private String messageInfo;

    /**
     * 设置角标，还可以实现显示数字的自动增减，如"+1"、"-1"、"1"等
     */
    private String badge;

    /**
     * 自定义tag
     */
    private List<String> tagList;

    /** 增加自定义的数据,返回给前端的数据 */
    private String customMsg;

    public String getCustomMsg() {
        return customMsg;
    }

    public void setCustomMsg(String customMsg) {
        this.customMsg = customMsg;
    }

    public String getCid() {
        return cid;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMessageInfo() {
        return messageInfo;
    }

    public void setMessageInfo(String messageInfo) {
        this.messageInfo = messageInfo;
    }

    public String getBadge() {
        return badge;
    }

    public void setBadge(String badge) {
        this.badge = badge;
    }

    public List<String> getTagList() {
        return tagList;
    }

    public void setTagList(List<String> tagList) {
        this.tagList = tagList;
    }

    public static PushMessage initial(String cid, String alias, String type, String title, String messageInfo,
                                      String badge, List<String> tagList, String customMsg) {
        PushMessage msg = new PushMessage();
        msg.setCid(cid);
        msg.setAlias(alias);
        msg.setType(type);
        msg.setTitle(title);
        msg.setMessageInfo(messageInfo);
        msg.setBadge(badge);
        msg.setTagList(tagList);
        msg.setCustomMsg(customMsg);
        return msg;
    }

    @Override
    public String toString() {
        return "PushMessage{" +
                "cid='" + cid + '\'' +
                ", alias='" + alias + '\'' +
                ", type='" + type + '\'' +
                ", title='" + title + '\'' +
                ", messageInfo='" + messageInfo + '\'' +
                ", badge='" + badge + '\'' +
                ", tagList=" + tagList +
                ", customMsg='" + customMsg + '\'' +
                '}';
    }
}
